package com.zy.cat.entity.dev;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.RequiredArgsConstructor;

/**
 * 
 * @info 用户任务配置表
 * @author Link
 * @date 2019-10-30 08:56
 */
@Entity
@Table(name = "zy_cat_user_task_config",
indexes = {
		@Index(name = "typeId", columnList = "type_id"),
		@Index(name = "taskAttribute", columnList = "task_attribute"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@RequiredArgsConstructor
@ApiModel("用户福利中心任务配置表")
public class CatDevUserTaskConfig {
	
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	@Column(name = "type_id",columnDefinition = "INT(32) NOT NULL COMMENT '任务类型ID'")
	@ApiModelProperty(value = "任务类型ID", example = "0")
    private int typeId;
	
	@Column(columnDefinition = "VARCHAR(100)  NOT NULL  COMMENT '任务内容'")
	@ApiModelProperty(value = "任务内容", example = "绑定手机号")
    private String content;
	
	@Column(name = "bean_num",columnDefinition = "INT(10) DEFAULT '0' COMMENT '现金豆数量'")
	@ApiModelProperty(value = "奖励现金豆数量", example = "6")
	private int beanNum;
	
	@Column(name = "task_attribute",columnDefinition = "INT(2) DEFAULT '0' COMMENT '任务属性(0.新人任务、1.每日任务)'")
	@ApiModelProperty(value = "任务属性(0.新人任务、1.每日任务)", example = "0")
	private int taskAttribute;
	
	@Column(name = "task_num",columnDefinition = "INT(10) DEFAULT '1' COMMENT '任务次数'")
	@ApiModelProperty(value = "任务次数", example = "1")
	private int taskNum;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56")
	private String ctime="-";
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后修改时间'")
	@ApiModelProperty(value = "最后修改时间", example = "2019-02-22 12:56:56")
	private String ltime="-";

	public CatDevUserTaskConfig(int typeId, String content, int beanNum,int taskAttribute, String ctime,
			String ltime) {
		super();
		this.typeId = typeId;
		this.content = content;
		this.beanNum = beanNum;
		this.taskAttribute = taskAttribute;
		this.ctime = ctime;
		this.ltime = ltime;
	}
}
